// 报告类型
// export type ReportType = 'government' | 'enterprise' | 'institution' | 'all';

export type ReportType = 'industry' | 'phase' | 'custom';
export type ReportStatus = 'draft' | 'published' | 'archived';

// 报告基础数据
interface BaseReport {
  title: string;
  type: ReportType;
  content: string;
  summary?: string;
  tags?: string[];
  status: 'draft' | 'published';
  dataConfig?: {
    charts?: ChartConfig[];
    tables?: TableConfig[];
  };
}

// 报告详情数据
export interface Report extends BaseReport {
  id: string;
  createdAt: string;
  updatedAt: string;
  createdBy: string;
  publishedAt?: string;
}

// 图表配置
export interface ChartConfig {
  id: string;
  type: 'line' | 'bar' | 'pie' | 'radar';
  title: string;
  data: any;
  options?: any;
}

// 表格配置
export interface TableConfig {
  id: string;
  title: string;
  columns: {
    title: string;
    dataIndex: string;
    key: string;
  }[];
  data: any[];
}

// 报告查询参数
export interface ReportQuery {
  type?: ReportType;
  keyword?: string;
  status?: string;
  startDate?: string;
  endDate?: string;
}


// 接口类型定义
export interface ReportListParams {
  page?: number;
  pageSize?: number;
  type?: ReportType;
  status?: ReportStatus;
  keyword?: string;
  timeRange?: {
    start: string;
    end: string;
  };
}

export interface ReportItem {
  id: string;
  title: string;
  type: string;
  status: string;
  author: string;
  createTime: string;
  updateTime: string;
  publishTime: string;
  summary: string;
  tags: string[];
  viewCount: number;
}

export interface ReportSection {
  title: string;
  content: string;
}

export interface ReportContent {
  sections: ReportSection[];
  conclusion?: string;
}

export interface ReportAttachment {
  fileId: string;
  fileName: string;
  fileSize: number;
  fileType: string;
  url: string;
}

export interface ReportDetail extends ReportItem {
  // content: ReportContent;
  content: string;
  attachments: ReportAttachment[];
  references: {
    title: string;
    url: string;
    type: string;
  }[];
  version: string;
}

export interface ReportFormData extends Omit<ReportDetail, 'content'> {
  content: string;
  conclusion?: string;
}
